package Env;
public class Car {
	private int speed;
	private float eff;

	public Car(int speed,float eff) throws Exception{
		this.speed=speed;
		this.eff=eff;
		if (eff<0 || eff>1)
			throw (new Exception("illegal eff"));
	}

	public int getSpeed() {
		return speed;
	}

	public float getEff() {
		return eff;
	}

	@Override
	public String toString() {
		return "Car [eff=" + eff + ", speed=" + speed + "]\n";
	}
}